<?PHP
class tuihuoEntity
{
	public static function GetRow($tid)
	{
		$row = $_ENV['db']->fetch("SELECT * FROM `tuihuom` WHERE `tid` = '{$tid}'");
		return $row;
	}
	
	
	/*[退货单明细列表]*/
	public static function GetTuiHuoDetails($tid)
	{
		return $_ENV['db']->fetchAll("SELECT o.*,p.num,p.code,p.price as curprice FROM `tuihuod` as o LEFT JOIN `product` as p ON o.product_id=p.product_id WHERE `mid` = '{$tid}'");
	}
	
	
	/*更新价格*/
	public static function UpdatePrice($data,$tid)
	{
        UpdateTable('tuihuom', saddslashes($data),array('tid'=>$tid));
	}
}


?>